<template>
  <div class="empty-state" :style="'padding-top:'+top+'rem;'">
    <div class="empty-content">
      <img :src="imgUrl" :style="{width:size[0]+'rem',height:size[1]+'rem'}" alt="暂无内容">
      <h5 v-if="text2">{{text2}}</h5>
      <p>{{text}}</p>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    //距离顶部距离
    top: {
      type: String,
      default: 1
    },
    // 空状态图链接
    imgUrl: {
      type: String,
      default: ""
    },
    //空状态文本
    text: {
      type: String,
      default: ""
    },
    // 图片大小
    size: {
      type: Array,
      default: () => [1, 1]
    },
    // 有2行字，问答首页 第一行字是蓝色 暂无内容哦～
     text2: {
      type: String,
      default: ""
    }
  }
};
</script>
<style scoped lang="scss">
.empty-state {
  width: 100%;
  height: 100%;
  &.bgc-fff {
    position: fixed;
    background-color: #fff;
  }
  .empty-content {
    text-align: center;
    img {
      width: 1.79rem;
      height: 1.32rem;
      margin-bottom: 0.14rem;
    }
    p {
      font-size: 0.14rem;
      font-weight: 400;
      color: rgba(144, 147, 153, 1);
      line-height: 0.2rem;
    }
    h5 {
      font-size: 0.14rem;
      color: rgba(26, 142, 255, 0.7);
      line-height: 0.2rem;
      margin-bottom: 0.04rem;
    }
  }
}

</style>


